package IT07;
/*
可变参数：参数个数可变，用作方法的形参出现，那么方法的参数个数可变
 */
public class ArgsDemo {
    public static void main(String[] args) {
        System.out.println(sum(10,2,3,4,6,3,77));
    }
    public static int sum(int... a){
        int sum = 0;
        for(int i : a){
            sum += i;
        }
        return sum;
    }
}
